// 引入响应的模块
import Mock from "mockjs"
import banner from "./banner.json"
import floor from "./floor.json"
// import axios from "axios"

// 配置服务
// require 或 ES6中的import 会将引入进来的json文件直接转换成真正的数组或对象
Mock.mock("/mock/banner", "get", { code: 200, data: banner })
Mock.mock("/mock/floor", "get", { code: 200, data: floor })

// 测试请求
// axios.get("/mock/banner").then(
//   (res) => console.log(res.data),
//   (err) => console.log(err.message)
// )
